package com.github.zzay.care.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.zzay.care.dto.ElderlyDto;
import com.github.zzay.care.entity.Elderly;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zzay
 * @interfaceName ElderlyMapper
 * @description Mapper class for entity "Elderly"
 * @create 2022/07/06 08:36
 */
@Mapper
@Repository
public interface ElderlyMapper extends BaseMapper<Elderly> {

    /**
     * Select all information.
     *
     * @return A list of all information
     */
    List<ElderlyDto> selectAll();

    /**
     * Select the elderly person with the given name.
     *
     * @param name Name
     * @return Elderly person with the given name
     */
    ElderlyDto selectByName(String name);


    /**
     * Select the elderly person with the given id card number.
     *
     * @param idCard ID card number
     * @return Elderly person with the given id card number
     */
    ElderlyDto selectByIdCard(String idCard);

}
